package com.falcon.domain.req;

import java.util.Date;
import lombok.Data;
import lombok.experimental.Accessors;
import com.swan.mybatis.condition.Condition;
import com.swan.mybatis.condition.OpType;
import com.falcon.mvc.domain.AbsPageQuery;
import com.falcon.domain.po.EditConfigPO.Fields;


/** 代码生成配置
* @author zongf
* @since 2024-03-25
*/
@Data
@Accessors(chain = true)
public class EditConfigQuery extends AbsPageQuery{

    /** 主键 */
    private Long id;

    /** 创建者id */
    private Long creator;

    /** 创建时间 */
    private Date createTime;

    /** 表id */
    private Long tableId;

    /** 是否包含新增 */
    private Boolean insertEnable;

    /** 是否包含更新 */
    private Boolean updateEnable;

    /** 编辑组件类型: Modal/Drawer */
    private String editComponent;

    /** 标题 */
    private String titile;

    @Override
    public Condition toCondition() {
        Condition condition = Condition.newInstance();

        condition.and(Fields.id, OpType.equals, this.id);

        return condition;
    }

}
